﻿<ToolBar x:Class="CmdletHelpEditor.UI.UserControls.Parts.ToolBarFormat"
		 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		 xmlns:viewModel="clr-namespace:CmdletHelpEditor.API.ViewModel"
		 xmlns:converters="clr-namespace:CmdletHelpEditor.API.Converters"
		 mc:Ignorable="d"
		 d:DataContext="{d:DesignInstance viewModel:MainWindowVM}"
		 FontWeight="Bold"
		 FontFamily="Times New Roman"
		 FontSize="14" 
		 Background="{StaticResource NormalBlueGradientBrush}"
		 BorderThickness="1"
		 BorderBrush="#C4D1DE">
	<ToolBar.Resources>
		<converters:MultiParamConverter x:Key="MultiParamConverter" />
	</ToolBar.Resources>
	<Button x:Name="Bold"
			ToolTip="Bold (Ctrl + B)"
			MinWidth="21"
			Command="{x:Static viewModel:FormatCommands.SetCommonFormatCommand}">
		<Button.CommandParameter>
			<MultiBinding Converter="{StaticResource MultiParamConverter}">
				<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}"/>
				<Binding RelativeSource="{RelativeSource Self}"/>
			</MultiBinding>
		</Button.CommandParameter>
		<TextBlock Text="B"/>
	</Button>
	<Button x:Name="Italic"
			ToolTip="Italic (Ctrl + I)"
			MinWidth="21"
			Command="{x:Static viewModel:FormatCommands.SetCommonFormatCommand}">
		<Button.CommandParameter>
			<MultiBinding Converter="{StaticResource MultiParamConverter}">
				<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}"/>
				<Binding RelativeSource="{RelativeSource Self}"/>
			</MultiBinding>
		</Button.CommandParameter>
		<TextBlock Text="I" FontStyle="Italic"/>
	</Button>
	<Button x:Name="Underline"
			ToolTip="Underline (Ctrl + U)"
			MinWidth="21"
			Command="{x:Static viewModel:FormatCommands.SetCommonFormatCommand}">
		<Button.CommandParameter>
			<MultiBinding Converter="{StaticResource MultiParamConverter}">
				<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}"/>
				<Binding RelativeSource="{RelativeSource Self}"/>
			</MultiBinding>
		</Button.CommandParameter>
		<TextBlock Text="U" TextDecorations="Underline"/>
	</Button>
	<Button x:Name="Strike"
			ToolTip="Strikethrough (Ctrl + H)"
			MinWidth="21"
			Command="{x:Static viewModel:FormatCommands.SetCommonFormatCommand}">
		<Button.CommandParameter>
			<MultiBinding Converter="{StaticResource MultiParamConverter}">
				<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}"/>
				<Binding RelativeSource="{RelativeSource Self}"/>
			</MultiBinding>
		</Button.CommandParameter>
		<TextBlock Text="S" TextDecorations="Strikethrough"/>
	</Button>
</ToolBar>
